using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class UDF_PKT_FieldMap : EntityTypeConfiguration<UDF_PKT_Field>
    {
        public UDF_PKT_FieldMap()
        {
            // Primary Key
            this.HasKey(t => t.PKID);

            // Properties
            this.Property(t => t.Value_char)
                .HasMaxLength(100);

            this.Property(t => t.RecordID)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("UDF_PKT_Field");
            this.Property(t => t.PKID).HasColumnName("PKID");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.SPID).HasColumnName("SPID");
            this.Property(t => t.FieldType).HasColumnName("FieldType");
            this.Property(t => t.Value_char).HasColumnName("Value_char");
            this.Property(t => t.Value_Date).HasColumnName("Value_Date");
            this.Property(t => t.Value_Bit).HasColumnName("Value_Bit");
            this.Property(t => t.Value_Money).HasColumnName("Value_Money");
            this.Property(t => t.Value_Int).HasColumnName("Value_Int");
            this.Property(t => t.Value_image).HasColumnName("Value_image");
            this.Property(t => t.Value_Text).HasColumnName("Value_Text");
            this.Property(t => t.RecordID).HasColumnName("RecordID");
            this.Property(t => t.Changed).HasColumnName("Changed");
        }
    }
}
